<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditHotelreservationTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditHotelreservationLabel_idHotelReservation}" for="idHotelReservation" />
                    <h:inputText id="idHotelReservation" value="#{hotelreservationController.selected.idHotelReservation}" title="#{bundle.EditHotelreservationTitle_idHotelReservation}" required="true" requiredMessage="#{bundle.EditHotelreservationRequiredMessage_idHotelReservation}"/>
                    <h:outputLabel value="#{bundle.EditHotelreservationLabel_numberOfPeople}" for="numberOfPeople" />
                    <h:inputText id="numberOfPeople" value="#{hotelreservationController.selected.numberOfPeople}" title="#{bundle.EditHotelreservationTitle_numberOfPeople}" required="true" requiredMessage="#{bundle.EditHotelreservationRequiredMessage_numberOfPeople}"/>
                    <h:outputLabel value="#{bundle.EditHotelreservationLabel_room}" for="room" />
                    <h:inputText id="room" value="#{hotelreservationController.selected.room}" title="#{bundle.EditHotelreservationTitle_room}" />
                    <h:outputLabel value="#{bundle.EditHotelreservationLabel_hotel}" for="hotel" />
                    <h:selectOneMenu id="hotel" value="#{hotelreservationController.selected.hotel}" title="#{bundle.EditHotelreservationTitle_hotel}" >
                        <f:selectItems value="#{hotelController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{hotelreservationController.update}" value="#{bundle.EditHotelreservationSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditHotelreservationViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{hotelreservationController.prepareList}" value="#{bundle.EditHotelreservationShowAllLink}" immediate="true"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
